Repository navigation
feat(card): port the thread card, rest stop and the harness fixes since 2026-11-18 - #44
Merged
Merged
Conversation
Carries the thread card (bin/card, hooks/thread-card.sh), the two-step rest stop (bin/rest-stop prep and arm), the armed compactor cycle and its live-lock interlock, the reminder-only context ladder (a stop is blocked only at 92%), two GET-only T3 reads, the smaller hook fixes and the doctrine and docs changes made since the last port (2026-11-18). Review edits: the armed thread is rechecked at dispatch, the recovery baton is kept when the /compact receipt is uncertain, and the reply tail is scanned for secret shapes before it is trimmed.
Exploitacious
added a commit
that referenced
this pull request
Dec 4, 2026
…46) * docs(rulings): give each standing order a kind; setup rulings lapse standing-orders.md gains a fourth column, Kind: setup (with a review date 14 days out), preference or guardrail, and its header explains them. BOOTSTRAP.md writes a non-default Round C posture as setup, Rounds D to F as preference, and box ground rules as guardrail. desk lapse moves a setup ruling past its review date to standing-orders-archive.md unless the Operator says keep; the tool arrives with the clean desk port. * docs(harness): add the desk facts: kinds, the archive and commands The harness skill gains a short section on the clean desk review: what cleaning the desk means, the three ruling kinds (setup lapses 14 days after its date unless kept; preference; guardrail, answered alone), that a lapsed or retired ruling is kept in standing-orders-archive.md and nothing is deleted, and the desk commands (desk, review, commit-review, keep, undo). The commands arrive with the template update that carries them. * fix(secrets): refuse age post-quantum identities in the scanner and card age 1.4's age-keygen makes AGE-SECRET-KEY-PQ-1 identities by default; the classical shape alone missed them. secrets-scan.sh and card's hard list both take the optional PQ- infix. Cases in card-test.py and secrets-guard-test.sh, built from parts so the files hold no matchable key; both fail on the parent tree. * test(compact-cycle): pin the dispatch-time arm check and the card route key OPS #44 carried the arm recheck (compact-arm-check, compact --arm-record) without its unit and t3-api cases; this adds them as the source repo landed them. context-watch-selftest gains the CARD_THREAD-alone key case and the dispatch marker for another baton, and its helpers unset the host's CARD_THREAD so a test run inside a T3 thread cannot change the route. * feat(memory): add the nightly settle in local mode, opt-in per box memory-index --settle archives, byte for byte into <pool>/_archive/, the lowest-ranked entries a pool's own digest cannot describe; --restore brings one back and --health records a row per run. The template runs it in local mode only (MEMORY_SETTLE_MODE=local and MEMORY_SETTLE_ROOT in ~/.config/ops/memory-settle.env): it commits in the owner's checkout through a checked write path (settle lock, checkout flock, journal recovery, captured paths, a temporary-index plumbing commit moved by compare-and-swap, executable commit hooks refused) and never fetches, adds a remote or pushes. Any other or missing mode is refused, never guessed. The index writer waits briefly on the settle lock, and the env reader fails closed on any form systemd could read differently. --find and --hint also read each pool's _archive/, and --find the CONTEXT/projects lessons paragraphs. The 60-entry pool cap warning is gone; verify-ops check 6b now reads the settle's status file and SKIPs on a box without it. memory-backfill-modified stamps missing metadata.modified once before a first settle. Opt-in by presence: deploy step 11 keeps installed units and the local-mode drop-in current and never installs, creates the env file, enables or starts anything; the named rollout does that per box (bin/README.md, Team box install). memory_settle.py and memory-backfill-modified join OPS_DESTRUCTIVE_TOOLS, their two suites OPS_SANDBOX_SUITES. README also documents t3-api.sh compact --arm-record. * feat(desk): add the desk check, ruling lapse and keep, and the owner review bin/desk, one self-contained file shared with the tree the template comes from, checks the AI context a session loads (stale core, dead references, ruling rows, duplicate pools) and caches one line in OPS_STATE_DIR; desk lapse, keep, review, commit-review and undo rewrite and commit the owner's rulings through a checked write path (plumbing commit, commit hooks refused, renameat2 swap, journal recovery). daily-sync.sh runs run_lapse then run_desk, both non-fatal with one sync.log line each. session-briefing.sh shows the cached Desk line and the one-time lapse notice from OPS_STATE_DIR, reading only. desk joins OPS_DESTRUCTIVE_TOOLS and its three suites OPS_SANDBOX_SUITES. desk-test.py sets OPS_DIR beside COWORK_DIR in its daily-sync harness; session-briefing-desk-test.sh pins this hook's full briefing on resume (it has no resume short form). README desk section and CHANGELOG for the whole pass. * test(deploy): end the trust step at the new memory settle step deploy-trust-test.sh evaluates deploy.sh from the trust assignment to the next section; step 11 now follows the trust step, so the cut ends at either section header. * fix(memory): honor a paused settle on manual runs; defer reload on an unknown T3 state Review fixes. A manual settle now reads MEMORY_SETTLE through the shared env-file reader, so the file's pause wins over a stale shell value. Deploy defers daemon-reload when the T3 status query fails or answers an unknown value. Tests cover both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Carries the thread card and the two-step rest stop into OPS, turns the context-watch ladder into reminders, and brings the smaller harness fixes and doctrine changes made since the last port.
bin/card(state under${OPS_STATE_DIR:-~/.local/state/ops}/cards/). The Operator is quoted only from what they typed in T3 (web or mobile); harness sends and other agents never count, and anything else is flagged origin unknown.hooks/thread-card.shprints the card after every compaction. The Stage-1 settings already register the hook (first inresume|compact, 30 s); it stays inert until this ships.bin/rest-stopprep and arm. Prep reviews the Operator's new messages and writes a five-field draft baton; arm checks the draft and the thread, then publishes the baton and startscompact-cycle.sh. A question in theasksregister no longer blocks a rest stop, because the last reply and the open asks travel with the resume. A draft never silences the context-watch interlock.compact-cycle.shstands down when the Operator or another run moved after arming, rechecks the thread once more at the moment of dispatch, and releases its baton when/compactwas never accepted; with no arm record it is unchanged.t3-api.shgainsthread-messagesandhistory(paged by cursor, GET only) andcompact --arm-record.rest-stopfirst puts a stranded baton back as a draft, unless/compactmay already have been sent (a killed worker, or a receipt that never came back), in which case it keeps the baton for recovery and does not send/compactagain.git-guard.shkeepsrest-stopand card writes on the main thread, as it doessession-end.memory-hint.shshows each entry once per session.secrets-guard.sh postqueues silently instead of costing a feedback turn.report-lintcounts a run of approval links as one ask.PROJECTS/sync-check.shandSync-Check.ps1leave linked worktrees alone.asksprefers an exact thread id over ids it starts.bin/README.md,DEPLOYMENT.md, the harness skill andproject-kata.mdfollow.Off switches
CC_THREAD_CARD=0turns the card print and the rest-stop route off and restores the hand-written baton route; card files stay readable.CC_CONTEXT_WATCH_POSTTOOL=0silences the mid-turn notes;CC_CONTEXT_WATCH=0silences the whole context hook.Known limits
/compactdispatch can still be followed by a compaction. The window is one request long; the message is kept and answered, and the resume then carries a baton written just before it.agent_idandlane-class; an in-process lane whose compaction payload carries neither would see the main thread's card.Checks run
.claude-config/bin/tests/, every self-test and the two PowerShell suites, asgate.ymlruns them: green.verify-ops.sh: green.gitleaks git --redactover the branch's full history: no findings. OPS's ownsecrets-scan.sh: clean.Review
Deploy, gate and guard code (
git-guard.sh,secrets-guard.sh,context-watch.sh,pre-compact.sh,compact-cycle.sh,t3-api.sh,rest-stop,card,verify-ops.sh,sync-check.sh) had one review round. The reviewer's own edits are in: the dispatch-time recheck, the kept recovery baton on an uncertain receipt, a secret-shape scan of the reply tail before trimming, and four selftest assertions that had not been running. Its three remaining notes are the known limits above, accepted as documented.Models: Opus 5.5 · Mythos 5.2 · reviewer: GPT-6.2 Sol, 1 round · harness: Claude Code in T3